package br.edu.infnet.avaliacao.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class FormacaoAlunoId implements java.io.Serializable {

	private static final long serialVersionUID = -3325062354491451686L;
	private int formacaoId;
	private int alunoId;

	public FormacaoAlunoId() {
	}

	public FormacaoAlunoId(int formacaoId, int alunoId) {
		this.formacaoId = formacaoId;
		this.alunoId = alunoId;
	}

	@Column(name = "formacao_id", nullable = false)
	public int getFormacaoId() {
		return this.formacaoId;
	}

	public void setFormacaoId(int formacaoId) {
		this.formacaoId = formacaoId;
	}

	@Column(name = "aluno_id", nullable = false)
	public int getAlunoId() {
		return this.alunoId;
	}

	public void setAlunoId(int alunoId) {
		this.alunoId = alunoId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FormacaoAlunoId))
			return false;
		FormacaoAlunoId castOther = (FormacaoAlunoId) other;

		return (this.getFormacaoId() == castOther.getFormacaoId())
				&& (this.getAlunoId() == castOther.getAlunoId());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getFormacaoId();
		result = 37 * result + this.getAlunoId();
		return result;
	}

}
